Skip to content

test: Wire wrapper, proxy, context comparison and secure mode hash in the contract test service - #250

Merged
kinyoklion merged 1 commit into
mainfrom
rlamb/contract-tests-wire-capabilities
Nov 3, 2026
Merged

kinyoklion merged 1 commit into
mainfrom
rlamb/contract-tests-wire-capabilities

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

The server contract test service now declares four capabilities that the SDK already supports, so the harness runs their tests on v2 and v3:

  • secure-mode-hash: the secureModeHash command was already handled, only the capability was missing.
  • wrapper: maps the harness's wrapper config onto LDConfig.Builder.wrapper. The harness sends "" for an unset name or version, so the service treats an empty string as unset.
  • http-proxy: maps proxy.httpProxy onto HttpConfigurationBuilder.proxyHostAndPort.
  • context-comparison: adds the contextComparison command, which builds both contexts and returns LDContext.equals.

Tested locally against harness v2.41.1 and v3.2.0-alpha.15 with the CI suppression files: 33 newly run tests pass on each version, and every test that passed before still passes.

Opened from termag


Note

Overview
The server contract test service is updated so the harness can exercise SDK features that were already implemented but not advertised or fully wired.

Capabilities added to the status endpoint: context-comparison, http-proxy, secure-mode-hash, and wrapper. For secure-mode-hash, only the capability string was missing—the secureModeHash command path was already in place.

Config mapping on client creation: harness wrapper name/version map to LDConfig.Builder.wrapper, with empty strings normalized to null (the harness sends "" for unset values). proxy.httpProxy maps to HttpConfigurationBuilder.proxyHostAndPort.

New command contextComparison: builds two contexts from harness params (single or multi, attributes, literal/path private attributes) and returns whether LDContext.equals holds between them.

Reviewed by Cursor Bugbot for commit 1ab7fc4. Bugbot is set up for automated code reviews on this repo. Configure here.

… the contract test service

Declare secure-mode-hash, whose command handler already existed, and wire
and declare wrapper, http-proxy and context-comparison, so that the harness
runs those tests on v2 and v3.

Generated-by: termag
@kinyoklion
kinyoklion marked this pull request as ready for review November 3, 2026 17:51
@kinyoklion
kinyoklion requested a review from a team as a code owner November 3, 2026 17:51
@kinyoklion
kinyoklion merged commit 8843f10 into main Nov 3, 2026
32 checks passed
@kinyoklion
kinyoklion deleted the rlamb/contract-tests-wire-capabilities branch November 3, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants